package com.cml.sqlversionupgradestarter.verif;


import com.cml.sqlversionupgradestarter.context.EnvConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;

/**
 * 作者：root
 * 时间：2022/1/6
 * 描述：用于初始化sql升级环境验证工作
 */
public class EnvVerification {
    private static Logger logger= LoggerFactory.getLogger(EnvVerification.class);
    public  static boolean verif(){
        File file=new File(EnvConstant.SQL_UPGRAD_FILE_PATH);
        if(file.exists() && file.isDirectory()){
            return true;
        }
        logger.error("请正确配置sql升级目录："+EnvConstant.SQL_UPGRAD_FILE_PATH);
        return false;
    }
}
